#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main(void)
{
	int a = 0;//divident
	int b = 0;//divisor
	scanf("%d %d", &a, &b);
	printf("%d %d", a / b, a % b);//quotient and remainder
	return 0;
}